﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
using WaitLess.Business.Data.Model;
using WaitLess.Business.Model;
using WaitLess.Business.Services;

namespace WaitLess.Business.Tests.Unit.MunicipalOfficeLoaderSpecifications
{
    [TestClass]
    public class WhenGetDistrictshuizen : MunicipalOfficeLoaderAsyncTestBase
    {
        public IEnumerable<MunicipalOffice> Result { get; set; }

        protected override void Act()
        {
            MunicipalOfficeLoader.GetDistrictshuizen(r =>
            {
                Result = r;
                IsActCompleted = true;
            });
        }

        [TestMethod]
        public void ThenResultShouldContainAllDistrictshuizen()
        {
            Assert.IsNotNull(Result);
            Assert.AreEqual(Districtshuizen.districtshuis.Count, Result.Count());
        }
    }
}
